<extend name="Public/base" />
<block name="body">
<!-- 弹窗插件 -->
<include file="Public:artdialog" />
<!-- 表单验证插件 -->
<include file="Public:validform" />

<form action="{:U('AdminUser/add')}" method="post" role="form" class="form-horizontal row-border vform" >
<input type="hidden" name="is_add" value="{$is_add}">
<input type="hidden" name="user_id" value="{$m['user_id']}">

<div class="row">
<div class="col-md-12">
<div class="block-web">
<div class="header">
    <h3 class="content-header"><if condition="$is_add eq 1">编辑<else/>添加</if>管理员</h3>
</div>
<div class="porlets-content">

    <div class="form-group">
        <label class="col-sm-2 control-label"><font class="red">*</font>用户名</label>
        <div class="col-sm-9">
            <input type="text" value="{$m['user_name']}"    <if condition="$is_add eq 0">ajaxurl="{:U('AdminUser/check')}" sucmsg="用户名验证通过！" <else/>readonly</if> name="user_name"   datatype="*" nullmsg="请输入用户名" class="form-control parsley-validated" />
            <div class="Validform_checktip"></div>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label"><font class="red">*</font>Email地址</label>
        <div class="col-sm-9">
            <input type="text" value="{$m['email']}" name="email"   <if condition="$is_add eq 0"> ajaxurl="{:U('AdminUser/check')}" sucmsg="Email验证通过！" </if> datatype="e" nullmsg="请输入Email地址" class="form-control parsley-validated" />
            <div class="Validform_checktip"></div>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label"><font class="red">*</font>新密码</label>
        <div class="col-sm-9">
            <input type="password" value="" name="password"    <if condition="$is_add eq 0"> datatype="*" nullmsg="请输入新密码"</if> class="form-control parsley-validated" />
            <div class="Validform_checktip"></div>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label"><font class="red">*</font>确认密码</label>
        <div class="col-sm-9">
            <input type="password"  name="passwordok"  recheck="password"  <if condition="$is_add eq 0"> datatype="*" nullmsg="请输入确认密码"</if> class="form-control parsley-validated" />
            <div class="Validform_checktip"></div>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label"><font class="red">*</font>授权组</label>
        <div class="col-sm-9">
            <volist name="authgrouplist" id="group">
                <label class="checkbox-inline">

                    <input type="checkbox" name="groupid[]" value="{$group['id']}"  <if condition="$group['istype'] eq 1"> checked</if>>
                    <span class="custom-checkbox"></span> {$group['title']}
                </label>
            </volist>
        </div>
    </div>


</div>




</div><!--/porlets-content-->
</div><!--/block-web-->
</div>

</div>

<div class="footer" >
    <button class="btn btn-primary btn-success bt_submit" type="submit">提交</button>
    <button class="btn btn-default bt_close" type="button" onclick="art.dialog.open.api.close();"
            >关闭</button>
</div>


</form>




</block>
<block name="script">

</block>